﻿#include "Boss1.h"
#include "GameUtil.h"

using namespace cocos2d;

Boss1::Boss1(void)
{
}


Boss1::~Boss1(void)
{
}

bool Boss1::init(){  
    if (!Enemy::init()) {  
        return false;  
    }  

	// init
	d_creatureSprite->initWithFile("boss1.png");

	d_maxHP = 1000;
	d_speed = 100;
	d_shootInterval = 100;
	d_stopPos = 55;
	d_bulletSpeed = 100;
	d_bulletDamage = 10;
	d_bulletType = BULLET_TYPE_3;

    return true;  
}

CCAction* Boss1::getWalkAction(){
    CCActionInterval*  actionBy = CCScaleBy::create(1.0f, 0.9f, 1.1f);
	CCAction* act = CCRepeatForever::create(CCSequence::create(actionBy, actionBy->reverse(), NULL));
	return act;
}

void Boss1::shoot(float dt)
{
	d_bulletManager->shoot(this, 0);
}
